#ifndef PATIENTPROFILEWIDGET_H
#define PATIENTPROFILEWIDGET_H

#include <QWidget>
#include <QJsonObject>
#include "../../../Common/models.h"
#include "../../../Common/protocol.h"

namespace Ui {
class PatientProfileWidget;
}

class PatientProfileWidget : public QWidget {
    Q_OBJECT
    
public:
    explicit PatientProfileWidget(const Patient& patient, QWidget *parent = nullptr);
    ~PatientProfileWidget();
    
private slots:
    void on_saveButton_clicked();
    void on_refreshButton_clicked();
    void onMessageReceived(MessageType type, const QJsonObject& data);
    
private:
    void loadPatientInfo();
    
    Ui::PatientProfileWidget *ui;
    Patient m_patient;
};

#endif // PATIENTPROFILEWIDGET_H

